<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>layout(布局)</title>
		
		<script type="text/javascript" src="../js/jquery-1.8.3.js" ></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js" ></script>
		<script src="../js/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script> 
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css"> 
		<link rel="stylesheet"  href="../js/easyui/themes/icon.css"> 

		
		<script>
			$(function(){
				$('#dg').datagrid({ 

					url:'data.json',pagination:'true',
				
				columns:[[ 
				
				{field:'code',title:'商品ID',width:100}, 
				
				{field:'name',title:'商品名称',width:100}, 
				
				{field:'price',title:'价格',width:100,align:'right'} 
				
				]],
				toolbar :[{
					id: "saveBun",
					text:"保存",
					iconCls: "icon-save",
					handler :function(){
						alert("正在保存...");
					}
				
						
					}]
				
				
				}); 


			});
			
		</script>
		
		
	</head>
	<body >
		
		<table id="dg"></table>



	</body>
</html>
